package com.heima.comment.pojos;

import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@Document("ap_comment")
public class Comment implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    // 当前做出评论的用户的id
    private String commentatorId;

    private Boolean forArticle;

    private String articleId;

    private Boolean replyToComment;

    @Indexed    //todo
    private String replyToCommentId;

    private String content;

    private Integer likes;

    // todo 在响应中的名字未定
    private Integer replies;

    // 0点赞  1取消  只在给出返回值时使用
    private Short operation;

    private String[] operatedUserIds;

    private Long minDate;

    private Integer size;

    private Long createdTime;

    private Long updatedTime;

}
